package com.neo.push.client.handler;

import com.neo.push.core.PongMessage;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;

/**
 * Created by lock on 17-7-28.
 * 丢弃pong 消息的handler
 *
 * 这个不是必须的，如果没有处理pong 消息，则走到 handler 尾部，一样不会被处理
 *
 */
public class PongDiscardHandler extends ChannelInboundHandlerAdapter {

    @Override
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
        if(msg instanceof PongMessage){
            return;
        }
        super.channelRead(ctx, msg);
    }

}
